<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php

$old_id = $_POST['old_id'];
$sec_id = $_POST['sec_id'];
$sec_des = $_POST['sec_des'];
$subject_id = $_POST['subject_id'];
$teacher_id = $_POST['teacher_id'];
$data = array("sec_id"=>"$sec_id",
       "sec_des"=>$_POST['sec_des'],
       "subject_id"=>$_POST['subject_id'],
       "teacher_id"=>$_POST['teacher_id']
    );

$dbfunc->update("tb_sec",$data,"sec_id = '{$old_id}'");

echo "<script>alert('ระบบได้บันทึกข้อมูลของคุณแล้วค่ะ');</script>";
echo $func->redirect("0","?module=admin&page=frm_mag_sec");
?>